import React from 'react';
import ReactDom from 'react-dom';

class Portals extends React.Component {
  constructor(props){
    super(props)

  }
  render() {
    const portals = ReactDom.createPortal(
      <div>
        <p style={{width: "100px", height: "100px", backgroundColor: "blue", textAlign: "center"}}>
          {this.props.children}
        </p>
      </div>,
      document.body
    )
    return portals;
  }
}

export default Portals